package com.bjpowernode.test06;
//计算n阶阶乘
public class JieCheng {
    public static void main(String[] args) {
        int n=5;
        int m = method(5);
        System.out.println(m);
    }
    public static int method(int n){
        if (n == 1){
            return 1;
        }else {
            return n*method(n-1);
        }
    }
}
